{template 'web/common/common'}
{template 'web/distribution/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/{php echo $_GPC['m']}/resource/swal/dist/sweetalert2.min.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/layui.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/new-common.css" />
<style>
</style>
<div class="layui-form">
    <table class="layui-table" style="width: 500px;float: left;">
        <caption>订单信息</caption>
        <colgroup>
            <col width="60">
            <col width="200">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td style="text-align: right;">订单编号:</td>
            <td>{$orderData['order_number']}</td>
        </tr>
        <tr>
            <td style="text-align: right;">下单时间</td>
            <td><?php echo date("Y-m-d H:i:s",$orderData['create_time']);?></td>
        </tr>
        <tr>
            <td style="text-align: right;">用户</td>
            <td>{$orderData['uid']}</td>
        </tr>
        <tr>
            <td style="text-align: right;">支付方式</td>
            <td>{$orderData['pat_method']}</td>
        </tr>
        <tr>
            <td style="text-align: right;">收货信息</td>
            <td>
                <p>姓名：{$orderData['name']}</p>
                <p>联系电话：{$orderData['phone']}</p>
                <p>收货地址：{$orderData['address']}</p>
            </td>
        </tr>

        <tr>
            <td style="text-align: right;">快递信息</td>
            <td>
                <p>快递公司：{$orderData['express_company']}</p>
                <p>快递单号：{$orderData['send_number']}</p>
            
            </td>
        </tr>

        <tr>
            <td colspan="2" style="text-align: center;">订单状态</td>
        </tr>
        <tr>
            <td style="text-align: right;">状态</td>
            <td>
                {if $orderData['status']==0}
                <span class="layui-badge layui-bg-gray">未支付</span>
                {else if $orderData['status']==1}
                <span class="layui-badge layui-bg-green">已支付</span>
                {else if $orderData['status']==2}
                <span class="layui-badge layui-bg-green">待收货</span>
                {else if $orderData['status']==3}
                <span class="layui-badge layui-bg-green">已完成</span>
                {else if $orderData['status']==5}
                <span class="layui-badge layui-bg-gray">已取消</span>
                {else if $orderData['status']==4}
                <a href="{url 'site/entry/refund',array('m'=>'kundian_farm','id'=>$item['id'],'version_id'=>$_GPC['version_id'])}">
                    <button type="button" class="cancel-order layui-btn layui-btn-danger">确认取消订单</button></a>
                {/if}
            </td>
        </tr>
        <tr>
            <td style="text-align: right;">支付时间</td>
            <td>
                {if $orderData['pay_time']==0}
                --：--
                {else}
                <?php echo date("Y-m-d H:i:s",$orderData['pay_time']);?>
                {/if}
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center;">订单金额</td>
        </tr>
        <tr>
            <td style="text-align: right;">总金额</td>
            <td>{$orderData['total_price']}元</td>
        </tr>
        <tr>
            <td style="text-align: right;">运费</td>
            <td>{$orderData['send_price']}元</td>
        </tr>
        <tr>
            <td style="text-align: right;">优惠金额</td>
            <td>{$orderData['coupon_price']}元</td>
        </tr>
        <tr>
            <td style="text-align: right;">实际支付金额</td>
            <td>{$orderData['pra_price']}元</td>
        </tr>
        </tbody>
    </table>

    {if $order_type==1 || $order_type==2}
    <table class="layui-table" style="width: 900px;float: left;margin-left: 30px;">
        <caption>商品信息</caption>
        <tbody>
        <tr>
            <td>商品编号</td>
            <td>商品封面</td>
            <td>商品名称</td>
            <td>规格</td>
            <td>数量</td>
            <td>小计</td>
        </tr>
        {loop $orderDetail $key $value}
        <tr>
            <td>{$value['goods_id']}</td>
            <td><img src="{$value['cover']}" style="width: 40px;height: 40px;" alt=""></td>
            <td>{$value['goods_name']}</td>
            <td>
                {loop $value['specItem'] $k $item}
                {$item['name']}:{$item['spec_value']}
                {/loop}
            </td>
            <td>{$value['count']}</td>
            <td>{$value['price']}元</td>
        </tr>
        {/loop}
        </tbody>
    </table>
    {else if $order_type==3}
    <table class="layui-table" style="width: 900px;float: left;margin-left: 30px;">
        <caption>商品信息</caption>
        <tbody>
        <tr>
            <td>商品编号</td>
            <td>商品封面</td>
            <td>商品名称</td>
            <td>规格</td>
            <td>数量</td>
            <td>小计</td>
        </tr>
        <tr>
            <td>{$orderDetail['id']}</td>
            <td><img src="{$orderDetail['animal_src']}" style="width: 40px;height: 40px;" alt=""></td>
            <td>{$orderDetail['animal_name']}</td>
            <td>
                --
            </td>
            <td>{$orderData['count']}</td>
            <td>{$orderData['total_price']}元</td>
        </tr>
        </tbody>
    </table>
    {else if $order_type==4}
    <table class="layui-table" style="width: 900px;float: left;margin-left: 30px;">
        <caption>商品信息</caption>
        <tbody>
        <tr>
            <td>商品编号</td>
            <td>商品封面</td>
            <td>商品名称</td>
            <td>规格</td>
            <td>数量</td>
            <td>小计</td>
        </tr>
        {loop $orderDetail $key $value}
        <tr>
            <td>{$value['lid']}</td>
            <td><img src="{$value['cover']}" style="width: 40px;height: 40px;" alt=""></td>
            <td>{$value['land_name']}</td>
            <td>
               --
            </td>
            <td>{$value['land_count']}</td>
            <td>{$value['land_price']}元</td>
        </tr>
        {/loop}
        </tbody>
    </table>
    {/if}

</div>


